<?php
    include 'base.php';


    $pagenum = $_GET['pagenum'];
    $pagesize = $_GET['pagesize'];
    $start = ($pagenum - 1) * $pagesize;

    $sql = "SELECT * FROM `community` LIMIT $start,$pagesize"; //连接数据表goods

    $res = $conn->query($sql);

    $arr = array();

    while ($row = mysqli_fetch_assoc($res)) {
        array_push($arr, $row);
    }

    echo json_encode($arr);
?>